﻿using System.ComponentModel.DataAnnotations.Schema;
using System.ComponentModel.DataAnnotations;

namespace Journeo_backend.Models.Domain
{
    [Table("transportation_plans")]
    public class TransportationPlan
    {
        [Key]
        public long TransportId { get; set; }

        [Required]
        public long PlanId { get; set; }

        [Required]
        public long FromAttractionId { get; set; }

        [Required]
        public long ToAttractionId { get; set; }

        [Required]
        public int? TransportOrder { get; set; }

        [Required]
        public string TransportType { get; set; }

        public decimal? Distance { get; set; }

        public decimal? Cost { get; set; }

        public string? RouteDetails { get; set; }

        public DateTime CreatedAt { get; set; } = DateTime.Now;

        [ForeignKey("PlanId")]
        public TravelPlan? TravelPlan { get; set; }

        [ForeignKey("FromAttractionId")]
        public Attraction? FromAttraction { get; set; }

        [ForeignKey("ToAttractionId")]
        public Attraction? ToAttraction { get; set; }
    }
}
